Black box testing is a widely used technique in software testing. Black box testing involves testing a software application without relying on the internal structure of the software application. Black box testers may not always have visibility to the lines of code of the software application covered by test cases during its execution. As such, black box testers do not have knowhow of code coverage percentage of test cases. Code coverage percentage is a measurement of lines of code of the software application that have been covered when the test case is executed against the software application code. Consequently, due to lack of knowledge of code coverage percentage of the black box test cases, effectiveness of test suite comprising of test cases cannot be measured. For example, in the event there are changes made in the software application code under test, impact analysis of the black box test cases cannot be done efficiently. In addition, lack of knowledge of code coverage results in redundant test execution and may also result in executing incorrect test cases which in turn is time consuming. Moreover, black box test cases are manually created and executed which is not an efficient process and entails a lot of manual effort in designing and maintaining the test cases. Manual authoring of test cases and lack of knowledge of code coverage data therefore impact quality of black box testing.
In light of the abovementioned disadvantages, there is a need for a method and system for automatic generation of test cases. In addition, there is a need for a method and system for optimization of the automatically generated test cases. Further, there is a need for a method and system for determining code coverage data of the test cases for efficient and effective black box testing.